<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model app\modules\admin\models\YlAdmin */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="cw-admin-form col-md-4 col-lg-4 col-md-offset-4 col-lg-offset-4">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'admin_username')->textInput(['maxlength' => true, 'readonly' => true]) ?>

    <?= $form->field($model, 'admin_password')->passwordInput(['maxlength' => true, 'value' => ''])->label("原密码") ?>  
    
    <?= $form->field($model, 'new_password')->passwordInput(['maxlength' => true, 'value' => '']) ?>
    
    <?= $form->field($model, 'again_password')->passwordInput(['maxlength' => true, 'value' => '']) ?>


    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? 'Create' : '修改', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
<script>
document.getElementById('cw-admin').setAttribute('class',"active pull-right");
</script>